package JDBC;

import java.sql.Connection;
import java.sql.Statement;

public class JDBCDemo2 {
    public static void main(String[] args) {
        try(Connection con = DBUtil.getConnection();) {
            Statement sta = con.createStatement();
            String sql ="INSERT INTO userinfo(username,password,nickname,age) " +
                    "VALUES('张三','123456','阿三',22)";
            sta.execute(sql);
            System.out.println("执行完毕!");;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
